package com.huang.lettersort;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.ListView;

public class MainActivity extends AppCompatActivity {

    private QuickIndexBar indexBar;
    private ListView listView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
        initData();
    }

    private void initView() {
        setContentView(R.layout.activity_main);
        indexBar = (QuickIndexBar) findViewById(R.id.quick_index_bar);
        listView = (ListView) findViewById(R.id.listview);
        
    }

    private void initData() {
        indexBar.setOnIndexSelectListener(new QuickIndexBar.OnIndexSelectListener() {
            @Override
            public void onLetterSelect(String index) {
                Log.e("tag", index);
            }
        });
    }
}
